<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td bgcolor="#cccccc" width="200" valign="top"><!-- variable RHS Menu -->
     	<?php require('templates/menu7.php');?>
 
				</td>
<td valign="top" style="padding:30px 30px 30px 30px;">
<!--content-->



<?php
if(!isset($_REQUEST['id'])){
?>
<table border="0" width="100%" align="center">
<tr>
  <td><img src="heading/User-Laptop-Details_03.jpg" /></td>
</tr>
<tr>
   <td>&nbsp;</td>
</tr>   
<tr>
	<td>
		<b><div id="resultshere1" class="errorText">
		<?php
	 if($_REQUEST['v']=='success')
	{
	echo 'Your Request has been submitted';
	}
	 ?>
	 <?php
	 if($_REQUEST['v']=='err')
	{
	echo 'Please Select the record';
	}
	 ?>
		</div>
		</b>
		</td>
	</tr>
<tr>
<td align="center"><?php echo GetUserLaptopDetailsGrid();?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>


<tr>
<td>&nbsp;</td>
</tr>

</table>
<?php }
else{
$sql = mysql_query('SELECT usr.user_id,usr.user_firstname,usr.user_lastname,lpt.laptopmodel,lpt.serial_no,lpt.depot_location FROM `laptop` as lpt INNER JOIN `users` as usr ON lpt.user_id = usr.user_id where usr.user_id="'.$_REQUEST['id'].'" ORDER BY  usr.user_no Asc');

$result = mysql_fetch_row($sql);

 ?>
 
 <form name="frmRegistration" id="frmRegistration" method="post" action="user_laptop_details_process.php">
 <input type="hidden" name="user_id" value="<?php echo $result[0];?>" />
		  <table class="grid" border="0">
		   <tr>
			  <td colspan="3"  height="10"></td>
			  </tr>
                <tr>
                <td><b>Employee First Name</b></td>
                <td>:</td>
                <td><input type="text" name="emp_fname" id="emp_fname" value="<?php echo $result[1];?>" size="20" disabled="disabled"></td>
              </tr>
			   <tr>
                <td><b>Employee Last Name</b></td>
                <td>:</td>
                <td><input type="text" name="emp_lname" id="emp_lname" value="<?php echo $result[2];?>" size="20" disabled="disabled"></td>
              </tr>
               <tr>
                <td><b>Laptop Model Name</b></td>
                <td>:</td>
                <td><input type="text" name="laptop_model1" id="laptop_model1" value="<?php echo $result[3];?>" size="20" disabled="disabled"></td>              
			  <tr>
              <tr>
                <td><b>Serial No</b></td>
                <td>:</td>
                <td><input type="text" name="serial_no" id="serial_no" value="<?php echo $result[4];?>" size="20" disabled="disabled"></td>              
			  <tr>
              <tr>
                <td><b>Select Laptop</b></td>
                <td>:</td>
                <td>
				<select name="laptop_model" id="laptop_model">
				<option value="<?php echo trim($result1[3]).'-'.trim($result1[4]); ?>" selected="selected"><?php echo $result[3].'-'.$result[4];?></option>
				
				<?php 
				$sql1 = mysql_query('SELECT laptop_name,laptop_model,depot_location,serial_no FROM `laptop_details` where depot_location ="'.$result[5].'"');
				while ($result1 = mysql_fetch_row($sql1))
				{

				if($result[4]!=$result1[3])
				{
				 ?>
                 <option value="<?php echo trim($result1[1]).'-'.trim($result1[3]); ?> "><?php echo trim($result1[1]).'-'.trim($result1[3]); ?></option>
                 
                 <?php } } ?>
                 </select>
                 </td>
              </tr>			  
			  <td colspan="3"  height="20"></td>
			  </tr>
              <tr>
                <td colspan="3" align="center">
				<input type="hidden" name="PageName" value="<?php echo $_SERVER['REQUEST_URI'];?>" />
				<input type="submit" value="Submit" name="submit" onClick="return Validate_Registration('frmRegistration');"></td>
              </tr>
			  <tr>
			  <td colspan="3"  height="20"></td>
			  </tr>
            </table>
			</form> 
 
 
 
 
<?php } ?>
    <!--end content-->
    </td>
	</tr>
  </table>
  </td>
  </tr>
</table>
